<template>
  <div class="homebox">
    <!-- 轮播图 -->
    <mt-swipe :auto="4000">
      <mt-swipe-item v-for="item in swipeList" :key="item.id">
        <img :src="item.img_url" alt="" />
      </mt-swipe-item>
    </mt-swipe>
    <!-- 九宫格 -->
    <ul class="mui-table-view mui-grid-view mui-grid-9">
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <router-link to="/home/newslist">
          <img src="../images/1.png" alt="">
          <div class="mui-media-body">主页</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <router-link to="/home/imagelist">
          <img src="../images/2.png" alt="">  
          <div class="mui-media-body">光影安师</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <router-link to="/home/goodlist">
          <img src="../images/3.png" alt="">
          <div class="mui-media-body">商城</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <a href="#">
          <img src="../images/4.png" alt="">
          <div class="mui-media-body">location</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <a href="#">
          <img src="../images/5.png" alt="">
          <div class="mui-media-body">Search</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <a href="#">
          <img src="../images/6.png" alt="">
          <div class="mui-media-body">Phone</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <a href="#">
          <img src="../images/7.png" alt="">
          <div class="mui-media-body">Setting</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <a href="#">
          <img src="../images/8.png" alt="">
          <div class="mui-media-body">about</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <a href="#">
          <img src="../images/9.png" alt="">
          <div class="mui-media-body">more</div>
        </a>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      swipeList: [],
    };
  },
  created() {
    this.getSwipeData();
  },
  methods: {
    getSwipeData() {
      this.$http.get("http://www.barteam.cn:8086/sliderlist").then((res) => {
        this.swipeList = res.data.Data;
      });
    },
  },
};
</script>

<style lang="less">
.homebox {
  background-color: #fff;
  .mint-swipe {
    width: 100%;
    height: 260px;
    img {
      width: 100%;
      height: 260px;
    }
    
  }
  .mui-grid-view {
    background-image: linear-gradient(to bottom right, #F97794, #623AA2);
    // background-image: linear-gradient(to bottom , pink, skyblue);
    padding-bottom: 50px;
  }
  .mui-table-view-cell img{
    width: 48px;
  }
}
</style>